﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ProjetoForm.Controles;

namespace ProjetoForm
{
    public partial class menuHomeAdmin : UserControl
    {
        FlowLayoutPanel Conteudo { get; set; }
        public menuHomeAdmin(FlowLayoutPanel containerAdmin)
        {
            InitializeComponent();
            this.Conteudo = containerAdmin;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Visible = false;

            Forms.controleCadastroFuncionario = new CadastroFuncionario(Conteudo);
            Conteudo.Controls.Add(Forms.controleCadastroFuncionario);

            Forms.controleCadastroFuncionario.Visible = true;
            this.Refresh();

        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Visible = false;

            Forms.controleCadastroCombo = new CadastroCombo(Conteudo);
            Conteudo.Controls.Add(Forms.controleCadastroCombo);

            Forms.controleCadastroCombo.Visible = true;
            this.Refresh();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Visible = false;

            Forms.controleCadastroPesquisa = new cadastroPesquisa(Conteudo);
            Conteudo.Controls.Add(Forms.controleCadastroPesquisa);

            Forms.controleCadastroPesquisa.Visible = true;
            this.Refresh();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            this.Visible = false;

            Forms.controleRelatorios = new Relatorios(Conteudo);
            Conteudo.Controls.Add(Forms.controleRelatorios);

            Forms.controleRelatorios.Visible = true;
            this.Refresh();

        }

        private void btn_logout_Click(object sender, EventArgs e)
        {
            new FormLogin().Show();
            this.FindForm().Dispose();
        }
    }
}
